package com.edu.design.proxy.dynamic;

public class Test {
	
	
	public static void carMove(){
		try {
			Moveable car = new Car();
			MoveInvocationHandle invocation = new MoveInvocationHandle(car);
			Moveable moveable = (Moveable) invocation.getProxy();
			moveable.move();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public static void humanMove(){
		try {
			Moveable human = new Human();
			MoveInvocationHandle invocation = new MoveInvocationHandle(human);
			Moveable moveable = (Moveable) invocation.getProxy();
			moveable.move();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		humanMove();
	}

}
